<?php
include('inc/connectbase.php');
$req=mysql_query("SELECT * FROM verif_mail ORDER BY idVM") or die(mysql_error());
while($row=mysql_fetch_array($req)){
	$VEmail=strtolower($row['VEmail']);
	$VEmail2=$row['VEmail'];
	$recup=mysql_query("SELECT * FROM recupemails WHERE Email='$VEmail' OR Email='$VEmail2'") or die (mysql_error());
	$nbuser=mysql_num_rows($recup);
	if($nbuser==0){
	$Agent=$row['Agent'];
	$Jour=$row['Jour'];
	$Mois=$row['Mois'];
	$Annee="2012";
	
	$data=mysql_fetch_assoc($recup);
	$idEmail=$data['idEmail'];
	$insert=mysql_query("INSERT INTO `stat_7` (`idVM` , `idEmail` , `VEmail` , `Agent` , `Jour` , `Mois` , `Annee`) VALUES ('', '$idEmail', '$VEmail', '$Agent', '$Jour', '$Mois', '$Annee')") or die(mysql_error());
	echo $VEmail."<br>";
	}
}